package a15_MapAndSet;

/**
 * @Author quan
 * @Description TODO
 * @Date 2023/4/29 18:09
 */
public class HashMapCodesTest {
    public static void main(String[] args) {
        HashMapCodes hashMap = new HashMapCodes(4);
        //增加元素
        hashMap.put(12,3);
        hashMap.put(1,5);
        hashMap.put(4,9);
        hashMap.put(11,15);
        hashMap.put(14,19);
//        System.out.println(hashMap);
//        System.out.println(hashMap.containsKey(1));
//        System.out.println(hashMap.containsKey(2));
//        System.out.println(hashMap.containsValue(3));
//        System.out.println(hashMap.containsValue(4));
        //根据key删除元素
        System.out.println(hashMap.removeByKey(2));
        System.out.println(hashMap.removeByKey(1));
    }
}
